﻿namespace DAL
{
    public class BaseRepository<T> where T : class
    {
        private readonly ManagementDbContext db;

        public BaseRepository(ManagementDbContext db)
        {
            this.db = db;
        }
        public IQueryable<T> GetAll()
        {
            return db.Set<T>().AsQueryable();
        }
        public int Del(T Id)
        {
            db.Set<T>().Remove(Id);
            return db.SaveChanges();
        }
        
    }
}